﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UCKhachHang.ascx.cs" Inherits="Admin_UCControls_KhachHang" %>

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

   <table width="100%">
     <tr>
     <td>Tên khách hàng</td>
     <td> <asp:TextBox ID="txtTenKhachHang" runat="server"></asp:TextBox></td>
     <td>Ngày DK</td>
     <td><asp:TextBox ID="txtNgayDangKy" runat="server"></asp:TextBox>
       <ajaxToolkit:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="txtNgayDangKy">
        </ajaxToolkit:CalendarExtender></td>
     <td><asp:Button ID="btnTim" runat="server" Text="Xem" OnClick="btnTim_Click" /></td>
     </tr>
     <tr>
     <td>Trạng thái</td>
     <td>
     <asp:DropDownList ID="ddlTrangThaiDuyet" runat="server" Width="140px">
         <asp:ListItem Value="-1">--Chọn--</asp:ListItem>
         <asp:ListItem Value="0">Chờ duyệt</asp:ListItem>
         <asp:ListItem Value="1">Duyệt</asp:ListItem>
         <asp:ListItem Value="2">Không Duyệt</asp:ListItem>
    </asp:DropDownList>
     </td>
     <td>CMND</td>
     <td><asp:TextBox ID="txtCMND" runat="server"></asp:TextBox></td>
     </tr>
   </table>
   
 

 <br />
<table width="100%">
    <tr>
        <td>
            <asp:GridView Width="100%" ID="GridKhachHang" runat="server" AllowPaging="True" PageIndex="20" AutoGenerateColumns="False" DataKeyNames="ID" 
                          OnRowCommand="GridKhachHang_RowCommand" OnPageIndexChanging="GridKhachHang_PageIndexChanging" 
                          CssClass="mGrid" PageSize="15" 
                          PagerStyle-CssClass="pgr"  
                          AlternatingRowStyle-CssClass="alt" 
                          EmptyDataText="Chưa có dữ liệu khách hàng" EmptyDataRowStyle-ForeColor="Blue" >
              <Columns>
                    <asp:TemplateField HeaderText="STT">
                    <ItemTemplate>
                         <%# Container.DataItemIndex + 1 %>  
                    </ItemTemplate>
                    </asp:TemplateField>
              
                   <asp:TemplateField HeaderText="Họ tên khách hàng">
                    <ItemTemplate>
                        <%# Eval("Ten") %>
                    </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="CMND">
                    <ItemTemplate>
                        <%# Eval("CMND") %>
                    </ItemTemplate>
                    </asp:TemplateField>
                    
                    <asp:TemplateField HeaderText="Ngày DK">
                    <ItemTemplate>
                        <%# Eval("NgayDangKy","{0:d}") %>
                    </ItemTemplate>
                    </asp:TemplateField>
                    
                   <%-- <asp:TemplateField HeaderText="Trạng thái">
                    <ItemTemplate>
                        <%# TrangThaiDuyet(Eval("TrangThaiDuyet"))%>
                    </ItemTemplate>
                    </asp:TemplateField>--%>
                    
                   <asp:TemplateField>
                   <ItemTemplate>
                        <asp:LinkButton ID="btnSua" runat="server" Text="Xem chi tiết"  CommandName="Sua" CommandArgument='<%#Bind("Id")%>' />
                         &nbsp;</ItemTemplate>
                    </asp:TemplateField>
                    
              </Columns>
            </asp:GridView>
        </td>
    </tr>
    <tr>
    <td style="padding-top:5px">
        </td>
    </tr>
</table>